﻿/**--------------公共变量 begin------------*/
var this_url = window.location.href.toLowerCase();
var regemail = /^\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/;
var regtelphone = /(^(\d{11})$|^((\d{7,8})|(\d{4}|\d{3})-(\d{7,8})|(\d{4}|\d{3})-(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1})|(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1}))$)/;
var regnum = /^\d+$/;
var regcode = /[1-9]\d{5}(?!\d)/;
var regID = /^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])(\d{4}|\d{3}x)$/;
var this_protocol = window.location.protocol;
var this_host = window.location.host;
var GetDomain = this_protocol + '//' + this_host;
var hash = {
    'qq.com': 'http://mail.qq.com',
    'gmail.com': 'http://mail.google.com',
    'sina.com': 'http://mail.sina.com.cn',
    '163.com': 'http://mail.163.com',
    '126.com': 'http://mail.126.com',
    'yeah.net': 'http://www.yeah.net/',
    'sohu.com': 'http://mail.sohu.com/',
    'tom.com': 'http://mail.tom.com/',
    'sogou.com': 'http://mail.sogou.com/',
    '139.com': 'http://mail.10086.cn/',
    'hotmail.com': 'http://www.hotmail.com',
    'live.com': 'http://login.live.com/',
    'live.cn': 'http://login.live.cn/',
    'live.com.cn': 'http://login.live.com.cn',
    '189.com': 'http://webmail16.189.cn/webmail/',
    'yahoo.com.cn': 'http://mail.cn.yahoo.com/',
    'yahoo.cn': 'http://mail.cn.yahoo.com/',
    'eyou.com': 'http://www.eyou.com/',
    '21cn.com': 'http://mail.21cn.com/',
    '188.com': 'http://www.188.com/',
    'foxmail.coom': 'http://www.foxmail.com'
};


/**--------------公共变量 end------------*/


function getNewsBokeUserInfo() {

    var data = "cmd=getNewsBokeUserInfo";
    ajaxhelpS(data, function (msg) {
        var obj = eval('(' + msg + ')');
        if (unescape(obj.state) == 1) {
            $('#userinfoDl').html(unescape(obj.info));
            $('#wdbkLink').attr("href", unescape(obj.href));

            $('#dengl').hide();
            $('#geren').show();
        } else {
            $('#dengl').show();
            $('#geren').hide();
        }
    })
}
function btnNewsBokeList() {

    $('#hidXX').val($('#showtext').text());
    $('#hidKey').val($('#txtKey').val());
    getNewsBokeList(1);
}

function getNewsBokeList(p) {

    var k = $('#hidKey').val();
    var f = $('#hidFL').val();
    var x = $('#hidXX').val();

    var data = "cmd=getNewsBokeList&p=" + p + "&k=" + k + "&f=" + f + "&x=" + x + "";
    ajaxhelpS(data, function (msg) {
        var obj = eval('(' + msg + ')');
        if (unescape(obj.listnew).length > 30) {
            $('#ajaxNewsBokeListNew').show();
            $('div.bolg_l_hot_bxslider').show();
            $('#ajaxNewsBokeListNew').html(unescape(obj.listnew));
        } else {
            $('#ajaxNewsBokeListNew').hide();
            $('div.bolg_l_hot_bxslider').hide();
            $('#ajaxNewsBokeList').html(unescape(obj.list));
            $('#ajaxPage').html(unescape(obj.page));
        }
        if (unescape(obj.list).length > 30) {
            $('#ajaxNewsBokeList').html(unescape(obj.list));
            $('#ajaxPage').html(unescape(obj.page));
        }
        //    $('#ajaxNewsBokeListNew').html(unescape(obj.listnew));
        //    $('#ajaxNewsBokeList').html(unescape(obj.list));
        //    $('#ajaxPage').html(unescape(obj.page));
        //    //$('#txtKey').val(hidKey);
    });
}

function btnCKFL(str, e) {

    $('#hidFL').val(str);
    getNewsBokeList(1);
    $('#ajaxFLlist>li>a').map(function () {
        $(this).removeClass("hover");
    })
    $(e).addClass("hover").siblings().removeClass("hover");
}

function getNewsBokeListHot() {

    var data = "cmd=getNewsBokeListHot";
    ajaxhelpS(data, function (msg) {
        var obj = eval('(' + msg + ')');
        if (unescape(obj.state) == 1) {
            $('#ajaxNewsBokeListHot').html(unescape(obj.list));
        }
    });
}

function getNewsBokeFLList() {

    var data = "cmd=getNewsBokeFLList";
    ajaxhelpS(data, function (msg) {
        var obj = eval('(' + msg + ')');
        if (unescape(obj.state) == 1) {
            $('#ajaxFLlist').html(unescape(obj.list));
        }
    });
}

$(document).on('click', ".modify_article .but02", function () {
    $(".art_bg").hide();
    $(".modify_article").hide();
});
$(document).on('click', 'div.operation a.medify', function () {
    var i = $(this).attr('data-id');
    var t = $(this).attr('data-title');
    var c = $(this).attr('data-content');
    $('#aid').val(i);
    $('#txtTitle').val(unescape(t));
    $('#content1').text(unescape(c));
    $('#content1').val(unescape(c));
    $(".art_bg").show();
    $(".art_add").show();
    $('#uhtml').val(c);
    editor1.html(unescape(c));
});

/*------------------发布博文----------------*/
function publicArticle(c) {
    var txtTitle = getValueDefaultError('#txtTitle', '', $('#txtTitle').attr('placeholder'), true);
    if (!txtTitle[1]) {
        return false;
    }
    txtTitle = txtTitle[0];

    var txtfenlei = getValueDefaultError('#txtfenlei', '', $('#txtfenlei').attr('txtfenlei'), true);
    if (!txtfenlei[1]) {
        return false;
    }
    txtfenlei = txtfenlei[0];
    /*-----------------------------------*/
    if (c.length == 0) {
        var thisIndex = layer.alert('请输入文章的内容', {
            time: 0,
            title: '提示信息',
            closeBtn: 0,
            btn: ['确定'],
            yes: function (index) {
                layer.close(thisIndex);
            }
        });
        return false;
    }
    /*-----------------------------------*/
    var i = $('#aid').val();

    var data = "cmd=publicArticle&t=" + TDES.encrypt(txtTitle) + "&c=" + TDES.encrypt(c) + "&i=" + TDES.encrypt(i) + "&fl=" + TDES.encrypt(txtfenlei) + "";
    ajaxhelpS(data, function (msg) {
        var obj = eval('(' + msg + ')');
        if (unescape(obj.state) == 1) {
            getArticleList(1);
        }
        var thisIndex = layer.alert(unescape(obj.info), {
            time: 0,
            title: '提示信息',
            closeBtn: 0,
            btn: ['确定'],
            yes: function (index) {
                layer.close(thisIndex);
                if (unescape(obj.state) == 1) {
                    $(".art_bg").hide();
                    $(".modify_article").hide();

                } else {
                    window.location = '/'
                }
            }
        });

    });
}


/*---------------------读取博文内容信息----------------*/
function getArticleContent() {
    var regUrl = /details\.html\?i=(.+)/;
    if (regUrl.test(this_url)) {
        var data = "cmd=getArticleContent&i=" + TDES.encrypt(regUrl.exec(this_url)[1]) + "";
        ajaxhelpS(data, function (msg) {
            var obj = eval('(' + msg + ')');
            if (unescape(obj.state) == 1) {
                $('#ajaxArticle').html(unescape(obj.info));
                $('#ajaxPrevNext').html(unescape(obj.pn));

                if (unescape(obj.Bkiszaishou) == "是") {
                    $('#divMsgBox').show();
                }
                else {
                    $('#divMsgBox').hide();
                }
                $('#divMsgBox').attr("data-Mauthor", unescape(obj.Mauthor));

            } else {
                window.location = '/';
            }
        });
    } else {
        window.location = '/';
    }
}

/*--------------------删除博客文章-----------------*/
$(document).on('click', 'div.operation a.del', function () {
    var aid = $(this).attr('data-id');
    var bid = $(this).attr('data-bid');
    /*-----------------------------------*/
    var thisIndex = layer.alert('您确定要删除此博文吗？删除后将不可回复。', {
        time: 0,
        title: '提示信息',
        closeBtn: 0,
        btn: ['确定', '取消'],
        yes: function (index) {
            var data = "cmd=articleDel&a=" + TDES.encrypt(aid) + "&b=" + TDES.encrypt(bid) + "";
            ajaxhelpS(data, function (msg) {
                var obj = eval('(' + msg + ')');
                if (unescape(obj.state) == 1) {
                    getArticleList(1);
                }
                var thisIndex = layer.alert(unescape(obj.info), {
                    time: 0,
                    title: '提示信息',
                    closeBtn: 0,
                    btn: ['确定'],
                    yes: function (index) {
                        layer.close(thisIndex);
                    }
                });
            });
        },
        no: function (index) {
            layer.close(thisIndex);
        }
    });

});

/*-------------------博主回复消息---------------*/
$(document).on('click', '.btnReply', function () {
    var i = $(this).attr('data-id');
    var mi = $(this).attr('data-mid');
    var bi = $(this).attr('data-bid');

    var txtMsgContent = getValueDefaultError('#txtContent' + i + '', '', $('#txtContent' + i + '').attr('placeholder'), true);
    if (!txtMsgContent[1]) {
        return false;
    }
    txtMsgContent = txtMsgContent[0];
    /*-----------------------------------*/
    var $this = $(this);
    $this.attr('disabled', 'disabled').val('数据提交中...');
    var data = "cmd=msgReply&c=" + TDES.encrypt(txtMsgContent) + "&i=" + TDES.encrypt(i) + "&mi=" + TDES.encrypt(mi) + "&bi=" + TDES.encrypt(bi) + "";
    ajaxhelpS(data, function (msg) {
        var obj = eval('(' + msg + ')');
        if (unescape(obj.state) == 1) {
            getMsgList();
        }
        var thisIndex = layer.alert(unescape(obj.info), {
            time: 0,
            title: '提示信息',
            closeBtn: 0,
            btn: ['确定'],
            yes: function (index) {
                layer.close(thisIndex);
                $this.removeAttr('disabled').val('提交');
            }
        });
    });
});


/*--------------------提交留言信息Blog----------------*/
$(document).on('click', '#btnMsgSubmitBlog', function () {
    var regUrl = /details\.html\?i=(.+)/;
    if (regUrl.test(this_url)) {

        var txtMsgContent = getValueDefaultError('#txtMsgContent', '', $('#txtMsgContent').attr('placeholder'), true);
        if (!txtMsgContent[1]) {
            return false;
        }
        txtMsgContent = txtMsgContent[0];


        /*-----------------------------------*/
        var $this = $(this);
        $this.attr('disabled', 'disabled').val('数据提交中...');
        var data = "cmd=msgSubmitBlog&c=" + TDES.encrypt(txtMsgContent) + "&i=" + TDES.encrypt(regUrl.exec(this_url)[1]) + "&t=" + TDES.encrypt($('#divMsgBox').attr("data-Mauthor"));

        ajaxhelpS(data, function (msg) {
            var obj = eval('(' + msg + ')');
            if (unescape(obj.state) == 1) {
                getMsgListBlog();
            }
            var thisIndex = layer.alert(unescape(obj.info), {
                time: 0,
                title: '提示信息',
                closeBtn: 0,
                btn: ['确定'],
                yes: function (index) {
                    layer.close(thisIndex);
                    if (unescape(obj.state) == 1) {
                        $('#txtMsgContent').val('');
                        $this.removeAttr('disabled').val('提交');
                    } else {
                        $this.removeAttr('disabled').val('提交');
                    }
                }
            });
        });

    } else {
        window.location = '/';
    }
});

/*--------------------提交留言信息----------------*/
$(document).on('click', '#btnMsgSubmit', function () {
    var regUrl = /details11_(\d+)\.html/;
    var u = '';
    if (regUrl.test(this_url)) {
        u = regUrl.exec(this_url)[1];
    } else {
        window.location = '/member/login.html';
    }
    var txtMsgContent = getValueDefaultError('#txtMsgContent', '', $('#txtMsgContent').attr('placeholder'), true);
    if (!txtMsgContent[1]) {
        return false;
    }
    txtMsgContent = txtMsgContent[0];
    /*-----------------------------------*/
    var $this = $(this);
    $this.attr('disabled', 'disabled').val('数据提交中...');
    var data = "cmd=msgSubmit&c=" + TDES.encrypt(txtMsgContent) + "&u=" + TDES.encrypt(u) + "";
    ajaxhelpS(data, function (msg) {
        var obj = eval('(' + msg + ')');
        if (unescape(obj.state) == 1) {
            getMsgList();
        }
        var thisIndex = layer.alert(unescape(obj.info), {
            time: 0,
            title: '提示信息',
            closeBtn: 0,
            btn: ['确定'],
            yes: function (index) {
                layer.close(thisIndex);
                if (unescape(obj.state) == 1) {
                    $('#txtMsgContent').val('');
                    $this.removeAttr('disabled').val('提交');
                } else {
                    $this.removeAttr('disabled').val('提交');
                }
            }
        });
    });
});

function getMsgListBlog() {
    var regUrl = /details\.html\?i=(.+)/;
    if (regUrl.test(this_url)) {

        var data = "cmd=getMsgListBlog&i=" + TDES.encrypt(regUrl.exec(this_url)[1]);
        ajaxhelpS(data, function (msg) {
            var obj = eval('(' + msg + ')');
            if (unescape(obj.state) == 1) {
                $('#ajaxMsgList').html(unescape(obj.info));
            } else {
                window.location = '/member/login.html';
            }
        })
    }


}
/*--------------------评论内容删除----------------*/
$(document).on('click', 'a.MsgListBlogdel', function () {
    var aid = $(this).attr('data-id');

    var thisIndex = layer.alert('您确定要删除此评论内容吗？', {
        time: 0,
        title: '提示信息',
        closeBtn: 0,
        btn: ['确定', '取消'],
        yes: function (index) {
            var data = "cmd=MsgListBlogdel&a=" + TDES.encrypt(aid);
            ajaxhelpS(data, function (msg) {
                var obj = eval('(' + msg + ')');
                if (unescape(obj.state) == 1) {
                    getMsgListBlog();
                }
                var thisIndex = layer.alert(unescape(obj.info), {
                    time: 0,
                    title: '提示信息',
                    closeBtn: 0,
                    btn: ['确定'],
                    yes: function (index) {
                        layer.close(thisIndex);
                    }
                });
            });
        },
        no: function (index) {
            layer.close(thisIndex);
        }
    });

});

function getMsgList() {
    var regUrl = /details11_(\d+)\.html/;
    var u = '';
    if (regUrl.test(this_url)) {
        u = regUrl.exec(this_url)[1];
    } else {
        window.location = '/member/login.html';
    }
    var data = "cmd=getMsgList&u=" + TDES.encrypt(u) + "";
    ajaxhelpS(data, function (msg) {
        var obj = eval('(' + msg + ')');
        if (unescape(obj.state) == 1) {
            $('#ajaxMsgList').html(unescape(obj.info));
        } else {
            window.location = '/member/login.html';
        }
    })
}

function getUserInfoDiv() {
    var regUrl = /details11_(\d+)\.html/;
    var u = '';
    if (regUrl.test(this_url)) {
        u = regUrl.exec(this_url)[1];
    } else {
        window.location = '/member/login.html';
    }
    var data = "cmd=getUserInfoDiv&u=" + TDES.encrypt(u) + "";
    ajaxhelpS(data, function (msg) {
        var obj = eval('(' + msg + ')');
        if (unescape(obj.state) == 1) {
            $('#userinfodiv').html(unescape(obj.info));
            $.getScript('/js/ratio-img.js');
        } else {
            window.location = '/member/login.html';
        }
    })
}
/*-------------------个人文章绑定----------------*/
function getUserInfoB() {

    var regUrl = /details11_(\d+)\.html/;
    var u = '';
    if (regUrl.test(this_url)) {
        u = regUrl.exec(this_url)[1];
    } else {
        //window.location = '/member/login.html';
    }
    var data = "cmd=getUserInfoB&u=" + TDES.encrypt(u) + "";
    ajaxhelpS(data, function (msg) {
        var obj = eval('(' + msg + ')');
        if (unescape(obj.state) == 1) {
            $('#ajaxUserInfo').html(unescape(obj.info));
            $('#ajaxUserInfo2').html(unescape(obj.info2));
            $('#ajaxUserInfo3').html(unescape(obj.info3));
            $.getScript('/js/ratio-img.js');

        } else {            
            if (unescape(obj.state) == 2) {               
                window.location = '/index.html';
            } else {
                alert(unescape(obj.info));
            }

            //window.location = '/member/login.html';
        }
    })
}
function ArticleClick(str) {
    $('#cidHid').val(str);
    getArticleList(1);
}
function Articleclassification() {
    //var fl = $('#cidHid').val();
    var regUrl = /details11_(\d+)\.html/;
    var u = '';
    if (regUrl.test(this_url)) {
        u = regUrl.exec(this_url)[1];
    } else {
        window.location = '/member/login.html';
    }
    var data = "cmd=getArticleclassification&u=" + TDES.encrypt(u);
    ajaxhelpS(data, function (msg) {
        var obj = eval('(' + msg + ')');
        if (unescape(obj.state) == 1) {
            $('#Articleclassification').html(unescape(obj.info));

        } else {
            window.location = '/member/login.html';
        }
    })
}

function getArticleList(p) {

    var fl = $('#cidHid').val();
    var regUrl = /details11_(\d+)\.html/;
    var u = '';
    if (regUrl.test(this_url)) {
        u = regUrl.exec(this_url)[1];
    } else {
        window.location = '/member/login.html';
    }
    var data = "cmd=getArticleList&u=" + TDES.encrypt(u) + "&p=" + TDES.encrypt(p) + "&fl=" + TDES.encrypt(fl) + "";
    ajaxhelpS(data, function (msg) {
        var obj = eval('(' + msg + ')');
        if (unescape(obj.state) == 1) {
            $('#ajaxList').html(unescape(obj.info));
            $('#ajaxPage').html(unescape(obj.page));
            if (unescape(obj.blogger) == 1) {
                //$('#divUploadImg,#pUpdate,#btnUpdateNote,#spanCreate').show();
                $('#spanCreate').show();
                $('#divMsgBox').hide();
            } else {
                $('#divUploadImg,#pUpdate,#btnUpdateNote,#spanCreate').parent().remove();
                $('#divMsgBox').show();
            }
        } else {
            window.location = '/member/login.html';
        }
    })
}
/*------------------注销登录------------------*/
$(document).on('click', '#btnLoginOut', function () {
    var data = "cmd=loginout";
    ajaxhelpS(data, function (msg) {
        var obj = eval('(' + msg + ')');
        if (unescape(obj.state) == 1) {
            window.location = '/member/login.html';
        }
    })
});
function loginOut() {
    var data = "cmd=loginout";
    ajaxhelpS(data, function (msg) {
        var obj = eval('(' + msg + ')');
        if (unescape(obj.state) == 1) {
            $('#btnLogin2').removeAttr('disabled').val('登录');
            $('#txtEmail').val("");
            $('#txtPwd').val("");
            $('#dengl').show();
            $('#geren').hide();
        }
    })
}
/*------------------找回密码第三步-----------------*/
function checkLink() {
    var regLink = /forget3\.html\?e=([^&]+)&a=([^&]+)/;
    if (regLink.test(this_url)) {
        var data = "cmd=checkLink&e=" + TDES.encrypt(regLink.exec(this_url)[1]) + "&a=" + TDES.encrypt(regLink.exec(this_url)[2]) + "";
        ajaxhelpS(data, function (msg) {
            var obj = eval('(' + msg + ')');
            if (unescape(obj.state) == 0) {
                var thisIndex = layer.alert(unescape(obj.info), {
                    time: 0,
                    title: '提示信息',
                    closeBtn: 0,
                    btn: ['确定'],
                    yes: function (index) {
                        layer.close(thisIndex);
                        window.location = '/member/forget.html'

                    }
                });
            }
        })
    } else {
        window.location = '/member/forget.html'
    }
}

$(document).on('click', '#btnForgetThree', function () {
    var regLink = /forget3\.html\?e=([^&]+)&a=([^&]+)/;
    if (regLink.test(this_url)) {
        var txtPwd = getValueDefaultError('#txtPwd', '', $('#txtPwd').attr('placeholder'), true);
        if (!txtPwd[1]) {
            return false;
        }
        txtPwd = txtPwd[0];
        /*-----------------------------------*/
        var txtRePwd = getValueDefaultError('#txtRePwd', '', $('#txtRePwd').attr('placeholder'), true);
        if (!txtRePwd[1]) {
            return false;
        }
        txtRePwd = txtRePwd[0];
        if (txtPwd != txtRePwd) {
            var thisIndex = layer.alert('您两次输入的密码不一致，请检查！', {
                time: 0,
                title: '提示信息',
                closeBtn: 0,
                btn: ['确定'],
                yes: function () {
                    $('#txtRePwd').focus();
                    layer.close(thisIndex);
                }
            });
            return false;
        }
        /*-----------------------------------*/
        var $this = $(this);
        $this.attr('disabled', 'disabled').val('数据提交中...');
        var data = "cmd=forgetThree&e=" + TDES.encrypt(regLink.exec(this_url)[1]) + "&p=" + TDES.encrypt(txtPwd) + "&a=" + TDES.encrypt(regLink.exec(this_url)[2]) + "";
        ajaxhelpS(data, function (msg) {
            var obj = eval('(' + msg + ')');
            if (unescape(obj.state) == 1) {
                window.location = '/member/forget4.html';
            } else {
                var thisIndex = layer.alert(unescape(obj.info), {
                    time: 0,
                    title: '提示信息',
                    closeBtn: 0,
                    btn: ['确定'],
                    yes: function (index) {
                        layer.close(thisIndex);
                        $this.removeAttr('disabled').val('下一步');

                    }
                });
            }
        })
    } else {
        window.location = '/member/forget.html'
    }

});

/*-------------------找回密码 第一步-------------*/
$(document).on('click', '#btnForgetOne', function () {
    var txtEmail = getValueDefaultError('#txtEmail', '', $('#txtEmail').attr('placeholder'), true);
    if (!txtEmail[1]) {
        return false;
    }
    txtEmail = txtEmail[0];
    if (txtEmail == '747395843') {
        txtEmail = '747395843@qq.com';
    } else {
        txtEmail += '@allpku.com';
    }
    if (!regemail.test(txtEmail)) {
        var thisIndex = layer.alert('您输入的邮箱格式不正确，只需要输入公司邮箱前面部分即可！', {
            time: 0,
            title: '提示信息',
            closeBtn: 0,
            btn: ['确定'],
            yes: function (index) {
                $('#txtEmail').focus();
                layer.close(thisIndex);
            }
        });
        return false;
    }
    /*-----------------------------------*/
    var txtCode = getValueDefaultError('#txtCode', '', $('#txtCode').attr('placeholder'), true);
    if (!txtCode[1]) {
        return false;
    }
    txtCode = txtCode[0];
    /*-----------------------------------*/
    var $this = $(this);
    $this.attr('disabled', 'disabled').val('数据提交中...');
    var data = "cmd=forgetOne&e=" + TDES.encrypt(txtEmail) + "&c=" + TDES.encrypt(txtCode) + "";
    ajaxhelpS(data, function (msg) {
        var obj = eval('(' + msg + ')');
        var thisIndex = layer.alert(unescape(obj.info), {
            time: 0,
            title: '提示信息',
            closeBtn: 0,
            btn: ['确定'],
            yes: function (index) {
                layer.close(thisIndex);
                if (unescape(obj.state) == 1) {
                    window.location = '/member/forget2.html';
                } else {
                    $this.removeAttr('disabled').val('下一步');
                }
            }
        });

    })
});

/*---------------登录----------------*/
$(document).on('click', '#btnUpdateNote', function () {
    var data = "cmd=updateNote&n=" + TDES.encrypt($('div.intro_con>.area textarea').val()) + "";
    ajaxhelpS(data, function (msg) {
        var obj = eval('(' + msg + ')');
        if (unescape(obj.state) == 1) {
            $('div.intro_con>.con').show().html("简介：<br/>" + $('div.intro_con>.area textarea').val() + "");
            $('div.intro_con>.area textarea').text($('div.intro_con>.area textarea').val()).parent().hide();
        } else {
            window.location = '/member/login.html'
        }
    })
});
function loginCheck(j) {
    var data = "cmd=loginCheck";
    ajaxhelpS(data, function (msg) {
        var obj = eval('(' + msg + ')');
        //如果j=1 则表示未登录 状态需要跳转至登录页 否则不需要跳转
        if (j == 1) {
            if (unescape(obj.state) == 0) {
                window.location = '/member/login.html'
            }
        }

        if ($('#imgHead').attr('src') != undefined) {
            if (obj.UserHead != null) {
                $('#imgHead').attr('src', unescape(obj.UserHead));
            }
            if (obj.UserNote != null) {
                $('div.intro_con>.con').html("简介：<br/>" + unescape(obj.UserNote) + "");
                $('div.intro_con>.area textarea').text(unescape(obj.UserNote));
            }
        }
        $('div.top_lf').html(unescape(obj.info));


    })
}
function getDefaultUser() {
    var data = "cmd=getDefaultUser";
    ajaxhelpS(data, function (msg) {
        var obj = eval('(' + msg + ')');
        if (unescape(obj.state) == 1) {
            $('#txtEmail').val(unescape(obj.e));
            $('#txtPwd').val(unescape(obj.p));
        }
    })
}
$(document).on('click', '#btnLogin', function () {
    var txtEmail = getValueDefaultError('#txtEmail', '', $('#txtEmail').attr('placeholder'), true);
    if (!txtEmail[1]) {
        return false;
    }
    txtEmail = txtEmail[0];
    if (txtEmail == '747395843') {
        txtEmail = '747395843@qq.com';
    } else {
        txtEmail += '@allpku.com';
    }
    if (!regemail.test(txtEmail)) {
        var thisIndex = layer.alert('您输入的邮箱格式不正确，只需要输入公司邮箱前面部分即可！', {
            time: 0,
            title: '提示信息',
            closeBtn: 0,
            btn: ['确定'],
            yes: function (index) {
                $('#txtEmail').focus();
                layer.close(thisIndex);
            }
        });
        return false;
    }
    /*-----------------------------------*/
    var txtPwd = getValueDefaultError('#txtPwd', '', $('#txtPwd').attr('placeholder'), true);
    if (!txtPwd[1]) {
        return false;
    }
    txtPwd = txtPwd[0];
    /*-----------------------------------*/
    var txtCode = getValueDefaultError('#txtCode', '', $('#txtCode').attr('placeholder'), true);
    if (!txtCode[1]) {
        return false;
    }
    txtCode = txtCode[0];
    /*-----------------------------------*/
    var chkAutoLogin = $('#chkAutoLogin').prop('checked');
    /*-----------------------------------*/
    var $this = $(this);
    $this.attr('disabled', 'disabled').val('登录中...');
    var data = "cmd=login&e=" + TDES.encrypt(txtEmail) + "&p=" + TDES.encrypt(txtPwd) + "&c=" + TDES.encrypt(txtCode) + "&a=" + TDES.encrypt(chkAutoLogin) + "";
    ajaxhelpS(data, function (msg) {
        var obj = eval('(' + msg + ')');
        if (unescape(obj.state) == 1) {
            window.location = '/know/details11_' + unescape(obj.info) + '.html';
            //window.location = '/know/blog_content.html';
        } else {
            var thisIndex = layer.alert(unescape(obj.info), {
                time: 0,
                title: '提示信息',
                closeBtn: 0,
                btn: ['确定'],
                yes: function (index) {
                    layer.close(thisIndex);
                    $this.removeAttr('disabled').val('登  录');
                }
            });
        }
    })
});
$(document).on('click', '#btnLogin2', function () {
    var txtEmail = getValueDefaultError('#txtEmail', '', '请输入用户名', true);
    if (!txtEmail[1]) {
        return false;
    }
    txtEmail = txtEmail[0];
    if (txtEmail == '747395843') {
        txtEmail = '747395843@qq.com';
    } else {
        txtEmail += '@allpku.com';
    }
    if (!regemail.test(txtEmail)) {
        var thisIndex = layer.alert('您输入的邮箱格式不正确，只需要输入公司邮箱前面部分即可！', {
            time: 0,
            title: '提示信息',
            closeBtn: 0,
            btn: ['确定'],
            yes: function (index) {
                $('#txtEmail').focus();
                layer.close(thisIndex);
            }
        });
        return false;
    }
    /*-----------------------------------*/
    var txtPwd = getValueDefaultError('#txtPwd', '', '请输入登录密码', true);
    if (!txtPwd[1]) {
        return false;
    }
    txtPwd = txtPwd[0];
    /*-----------------------------------*/
    var txtCode = '-1';
    /*-----------------------------------*/
    var chkAutoLogin = $('#chkAutoLogin').prop('checked');
    /*-----------------------------------*/
    var $this = $(this);
    $this.attr('disabled', 'disabled').val('登录中...');
    var data = "cmd=login&e=" + TDES.encrypt(txtEmail) + "&p=" + TDES.encrypt(txtPwd) + "&c=" + TDES.encrypt(txtCode) + "&a=" + TDES.encrypt(chkAutoLogin) + "";
    ajaxhelpS(data, function (msg) {
        var obj = eval('(' + msg + ')');
        if (unescape(obj.state) == 1) {
            //window.location = '/know/details11_' + unescape(obj.info) + '.html';
            //window.location = '/know/blog_content.html';
            getNewsBokeUserInfo();
        } else {
            var thisIndex = layer.alert(unescape(obj.info), {
                time: 0,
                title: '提示信息',
                closeBtn: 0,
                btn: ['确定'],
                yes: function (index) {
                    layer.close(thisIndex);
                    $this.removeAttr('disabled').val('登  录');
                }
            });
        }
    })
});


/*------------------注册---------------*/
$(document).on('click', '#btnReg', function () {
    var txtEmail = getValueDefaultError('#txtEmail', '', $('#txtEmail').attr('placeholder'), true);
    if (!txtEmail[1]) {
        return false;
    }
    txtEmail = txtEmail[0];
    if (txtEmail == '747395843') {
        txtEmail = '747395843@qq.com';
    } else {
        txtEmail += '@allpku.com';
    }
    if (!regemail.test(txtEmail)) {
        var thisIndex = layer.alert('您输入的邮箱格式不正确，只需要输入公司邮箱前面部分即可！', {
            time: 0,
            title: '提示信息',
            closeBtn: 0,
            btn: ['确定'],
            yes: function (index) {
                $('#txtEmail').focus();
                layer.close(thisIndex);
            }
        });
        return false;
    }
    /*-----------------------------------*/
    var txtPwd = getValueDefaultError('#txtPwd', '', $('#txtPwd').attr('placeholder'), true);
    if (!txtPwd[1]) {
        return false;
    }
    txtPwd = txtPwd[0];
    /*-----------------------------------*/
    var txtRePwd = getValueDefaultError('#txtRePwd', '', $('#txtRePwd').attr('placeholder'), true);
    if (!txtRePwd[1]) {
        return false;
    }
    txtRePwd = txtRePwd[0];
    if (txtPwd != txtRePwd) {
        var thisIndex = layer.alert('您两次输入的密码不一致，请检查！', {
            time: 0,
            title: '提示信息',
            closeBtn: 0,
            btn: ['确定'],
            yes: function () {
                $('#txtRePwd').focus();
                layer.close(thisIndex);
            }
        });
        return false;
    }
    /*-----------------------------------*/
    var txtCode = getValueDefaultError('#txtCode', '', $('#txtCode').attr('placeholder'), true);
    if (!txtCode[1]) {
        return false;
    }
    txtCode = txtCode[0];
    /*-----------------------------------*/
    var chkAgree = $('#chkAgree').prop('checked');
    if (!chkAgree) {
        var thisIndex = layer.alert('您未阅读并同意【服务协议】！', {
            time: 0,
            title: '提示信息',
            closeBtn: 0,
            btn: ['确定'],
            yes: function (index) {
                layer.close(index);
            }
        });
        return false;
    }
    /*-----------------------------------*/
    var $this = $(this);
    $this.attr('disabled', 'disabled').val('注册中...');
    var data = "cmd=reg&e=" + TDES.encrypt(txtEmail) + "&p=" + TDES.encrypt(txtRePwd) + "&c=" + TDES.encrypt(txtCode) + "";
    ajaxhelpS(data, function (msg) {
        var obj = eval('(' + msg + ')');
        var thisIndex = layer.alert(unescape(obj.info), {
            time: 0,
            title: '提示信息',
            closeBtn: 0,
            btn: ['确定'],
            yes: function (index) {
                layer.close(thisIndex);
                if (unescape(obj.state) == 1) {
                    window.location = this_url;
                } else {
                    $this.removeAttr('disabled').val('注  册');
                }
            }
        });
    })
});

$(document).on('click', '#divCode', function () {
    var txtEmail = getValueDefaultError('#txtEmail', '', $('#txtEmail').attr('placeholder'), true);
    if (!txtEmail[1]) {
        return false;
    }
    txtEmail = txtEmail[0];
    if (txtEmail == '747395843') {
        txtEmail = '747395843@qq.com';
    } else {
        txtEmail += '@allpku.com';
    }
    if (!regemail.test(txtEmail)) {
        var thisIndex = layer.alert('您输入的邮箱格式不正确，只需要输入公司邮箱前面部分即可！', {
            time: 0,
            title: '提示信息',
            closeBtn: 0,
            btn: ['确定'],
            yes: function (index) {
                $('#txtEmail').focus();
                layer.close(thisIndex);
            }
        });
        return false;
    }
    /*-----------------------------------*/
    var txtPwd = getValueDefaultError('#txtPwd', '', $('#txtPwd').attr('placeholder'), true);
    if (!txtPwd[1]) {
        return false;
    }
    txtPwd = txtPwd[0];
    /*-----------------------------------*/
    var txtRePwd = getValueDefaultError('#txtRePwd', '', $('#txtRePwd').attr('placeholder'), true);
    if (!txtRePwd[1]) {
        return false;
    }
    txtRePwd = txtRePwd[0];
    if (txtPwd != txtRePwd) {
        var thisIndex = layer.alert('您两次输入的密码不一致，请检查！', {
            time: 0,
            title: '提示信息',
            closeBtn: 0,
            btn: ['确定'],
            yes: function (index) {
                $('#txtRePwd').focus();
                layer.close(thisIndex);
            }
        });
        return false;
    }
    /*-----------------------------------*/
    var chkAgree = $('#chkAgree').prop('checked');
    if (!chkAgree) {
        var thisIndex = layer.alert('您未阅读并同意【服务协议】！', {
            time: 0,
            title: '提示信息',
            closeBtn: 0,
            btn: ['确定'],
            yes: function (index) {
                layer.close(thisIndex);
            }
        });
        return false;
    }
    /*-----------------------------------*/
    var $this = $(this);
    var data = "cmd=sendEmail&e=" + TDES.encrypt(txtEmail) + "";
    ajaxhelpS(data, function (msg) {
        var obj = eval('(' + msg + ')');
        var thisIndex = layer.alert(unescape(obj.info), {
            time: 0,
            title: '提示信息',
            closeBtn: 0,
            btn: ['确定'],
            yes: function (index) {
                layer.close(thisIndex);
            }
        });
    })
});


/*------------------纵横团队搜索--------------*/
$(document).on('click', '#ajaxArea>div,#ajaxIndustry,#ajaxIndustry2>div,#ajaxLevel>div', function () {
    $(this).addClass('on').siblings().removeClass('on');
    getTeamList();
});
$(document).on('click', '#btnAjaxName,#TeamSearch', function () {
    getTeamList();
});

function btnSelt(e) {
    $(e).addClass('on').siblings().removeClass('on');
    getTeamList();
}
function getCategoryList(id, showid) {
    var data = "cmd=getCategoryList&id=" + TDES.encrypt(id) + "";
    ajaxhelpS(data, function (msg) {
        var obj = eval('(' + msg + ')');
        $('#' + showid).html('<div value="" data-val="" onclick="btnSelt(this);" class="on"><a>全部</a></div>' + unescape(obj.info));
    });
}

$(document).on('click', '#btnPaper', function () {
    getPaperList();
});
function getPaperList() {
    var strkey = '';
    var txtPaper = $('#txtPaper').val();
    if (txtPaper != undefined && txtPaper.length > 0) {
        strkey += " Title like '%" + txtPaper + "%'";
    }
    getList_FC(strkey.length > 0 ? TDES.encrypt(strkey) : "", 1);
}

function btnTeamSearch() {
    getTeamList();
}

function getTeamList() {
    var ajaxArea = $('#ajaxArea>div.on').attr('data-val');
    var ajaxIndustry = $('#ajaxIndustry>div.on').attr('data-val');
    var ajaxIndustry2 = $('#ajaxIndustry2>div.on').attr('data-val');
    var ajaxLevel = $('#ajaxLevel>div.on').attr('data-val');
    var txtAjaxName = getValue('#txtAjaxName');
    var strkey = '';
    if (ajaxArea != undefined && ajaxArea.length > 0) {
        strkey += "Category='" + ajaxArea + "'";
    }
    if (ajaxIndustry != undefined && ajaxIndustry.length > 0 && strkey.length > 0) {
        strkey += " and RelatedNews like '%" + ajaxIndustry + "%'";
    } else if (ajaxIndustry != undefined && ajaxIndustry.length > 0) {
        strkey += " RelatedNews like '%" + ajaxIndustry + "%'";
    }
    if (ajaxIndustry2 != undefined && ajaxIndustry2.length > 0 && strkey.length > 0) {
        strkey += " and AboutDownload like '%" + ajaxIndustry2 + "%'";
    } else if (ajaxIndustry2 != undefined && ajaxIndustry2.length > 0) {
        strkey += " AboutDownload like '%" + ajaxIndustry2 + "%'";
    }
    if (ajaxLevel != undefined && ajaxLevel.length > 0 && strkey.length > 0) {
        strkey += " and Category2='" + ajaxLevel + " '";
    } else if (ajaxLevel != undefined && ajaxLevel.length > 0) {
        strkey += "Category2='" + ajaxLevel + "'";
    }
    if (txtAjaxName != undefined && txtAjaxName.length > 0 && strkey.length > 0) {
        strkey += " and (Title like '%" + txtAjaxName + "%' or MultiLine2 like '%" + txtAjaxName + "%' or MultiLine3 like '%" + txtAjaxName + "%' or MultiLine4 like '%" + txtAjaxName + "%' or MultiLine5 like '%" + txtAjaxName + "%' or MultiLine6 like '%" + txtAjaxName + "%' or MultiLine7 like '%" + txtAjaxName + "%')";
    } else if (txtAjaxName != undefined && txtAjaxName.length > 0) {
        strkey += "(Title like '%" + txtAjaxName + "%' or MultiLine2 like '%" + txtAjaxName + "%' or MultiLine3 like '%" + txtAjaxName + "%' or MultiLine4 like '%" + txtAjaxName + "%' or MultiLine5 like '%" + txtAjaxName + "%' or MultiLine6 like '%" + txtAjaxName + "%' or MultiLine7 like '%" + txtAjaxName + "%')";
    }
    //getList_FC(strkey.length > 0 ? TDES.encrypt(strkey) : "", 1);

    var data = "cmd=getteamList&k=" + (strkey.length > 0 ? TDES.encrypt(strkey) : "");

    ajaxhelpS(data, function (msg) {
        var obj = eval('(' + msg + ')');

        $('#ajaxList').html(unescape(obj.list));

    })



}

/**--------------职位搜索-----------*/

$(document).on('click', '#ajaxListli>a', function () {

    $(this).addClass('on').siblings().removeClass('on');

    $('#ajaxListli').attr("data-val", $(this).attr('data-val'));
    var strajaxListli = $(this).attr('data-val');
    var strajaxListli1 = $('#ajaxListli1').attr("data-val");
    var strkey = "";

    if (strajaxListli.length > 0) {
        strkey = "Category='" + strajaxListli + "'";
    }
    if (strajaxListli1.length > 0) {
        if (strkey.length > 0) {
            strkey += " and  Category1='" + strajaxListli1 + "'";
        } else {
            strkey = " Category1='" + strajaxListli1 + "'";
        }
    }

    getList_FC(strkey.length > 0 ? TDES.encrypt(strkey) : "", 1);
});

$(document).on('click', '#ajaxListli1>a', function () {
    $(this).addClass('on').siblings().removeClass('on');

    $('#ajaxListli1').attr("data-val", $(this).attr('data-val'));
    var strajaxListli = $('#ajaxListli').attr("data-val");
    var strajaxListli1 = $(this).attr('data-val');
    var strkey = "";

    if (strajaxListli.length > 0) {
        strkey = "Category=" + strajaxListli;
    }
    if (strajaxListli1.length > 0) {
        if (strkey.length > 0) {
            strkey += " and  Category1=" + strajaxListli1;
        } else {
            strkey = " Category1=" + strajaxListli1;
        }
    }
    getList_FC(strkey.length > 0 ? TDES.encrypt(strkey) : "", 1);
});

/*-----------------------------新全站搜索-------------------------------------------------------------------------*/
$(function () {

    $(function () {
        $(document).on("click", "#btnSearch", function () {
            if ($.trim($("#formd_search_id").val()) == '' || $.trim($('#formd_search_id').val()) == '请输入关键字') {
                $('#formd_search_id').focus();
                alert("请输入搜索内容！");
                return;
            }
            else {
                window.location = "/sec_nav/search.html?key=" + escape($.trim($("#formd_search_id").val())) + "";
            }
        });

        $(document).on("click", "#btnSearch3", function () {
            if ($.trim($("#formd_search_id3").val()) == '' || $.trim($('#formd_search_id3').val()) == '搜索...') {
                $('#formd_search_id3').focus();
                alert("请输入搜索内容！");
                return;
            }
            else {
                window.location = "/sec_nav/search.html?key=" + escape($.trim($("#formd_search_id3").val())) + "";
            }
        });

        $('#btnSearch2').click(function () {
            if ($.trim($("#formd_search_id2").val()) == '' || $.trim($("#formd_search_id2").val()) == '请输出要搜索的关键词') {
                $('#formd_search_id2').focus();
                alert("请输入搜索内容！");
                return;
            }
            $('#resultem').text($("#formd_search_id2").val());
            getLucenesSearch(escape($.trim($("#formd_search_id2").val())), 1);
        });
    })
})

/*----------------------当前位置定位-------------------*/
$(function () {
    var MenuName = $.trim($("div.wrap>div.know_tit>div.current span").text());
    //alert(MenuName);
    $('div.head-menu>div.wrap>nav>ul>li>a').map(function () {
        if ($.trim($(this).text()) == MenuName) {
            $(this).parent().addClass('on').siblings().removeClass('on');
        }
    });

    $('div.wrap>div>div.business-tab-head>a').map(function () {
        if ($.trim($(this).text()) == MenuName) {
            $(this).addClass('on').siblings().removeClass('on');
        }
    });

    $('div.tab-titd>ul.cf>li.tab-a>span>a').map(function () {
        if ($.trim($(this).text()) == MenuName) {
            $(this).parent().parent().addClass('on').siblings().removeClass('on');
        }
    });

    MenuName = $.trim($("div.wrap>div.know_tit>div.current a:eq(1)").text());

    $('div.head-menu>div.wrap>nav>ul>li>a').map(function () {
        if ($.trim($(this).text()) == MenuName) {
            $(this).parent().addClass('on').siblings().removeClass('on');
        }
    });


})
/*---------------------列表点赞----------------------*/

$(document).on('click', '.Mylike', function () {
    var strid = $(this).attr("data-id");//ID
    var objMylike = $(this);

    var data = "cmd=SetMylike&id=" + strid + "&Fieldlike=E91AD3948CAC48995386DD4F02C8DB76&Type=1&Count=1&ClassID=37";
    ajaxhelpS(data, function (msg) {
        var obj = eval('(' + msg + ')');

        if (unescape(obj.state) == "1") {
            //objMylike.text(Number(objMylike.text()) + Number(1));//点赞数自动加1
            $('span.Mylikelist').text(Number($('span.Mylikelist').text()) + Number(1))
        }
        else {
            alert(unescape(obj.info));
        }
    })
});

/*---------------------获取列表点赞----------------------*/
$(function () {
    var ids = '';
    $('.Mylikelist').map(function () {
        ids += $(this).attr('data-id') + ',';
    });

    if (ids.length == 0) {
        return;
    }
    var data = "cmd=GetHitsField&ids=" + TDES.encrypt(ids) + "&Field=E91AD3948CAC48995386DD4F02C8DB76";
    ajaxhelpS(data,
	function (msg) {
	    var obj = eval('(' + msg + ')');

	    if (unescape(obj.state) == 1) {
	        var hits = unescape(obj.info);

	        for (var i = 0; i < hits.split(',').length; i++) {
	            $('.Mylikelist').eq(i).text(hits.split(',')[i]);
	        }
	    }
	});
});

/*--------------浏览次数绑定-------------*/
$(function () {
    var ids = '';
    $('.hits').map(function () {
        ids += $(this).attr('data-id') + ',';
    });

    if (ids.length == 0) {
        return;
    }
    var data = "cmd=getHits&ids=" + TDES.encrypt(ids) + "";
    ajaxhelpS(data,
	function (msg) {
	    var obj = eval('(' + msg + ')');

	    if (unescape(obj.state) == 1) {
	        var hits = unescape(obj.info);

	        for (var i = 0; i < hits.split(',').length; i++) {
	            $('.hits').eq(i).text(hits.split(',')[i]);
	        }
	    }
	});
});



$(function () {
    $(document).on("click", "#btnReset", function () {
        window.location.href = this_url;
    });
    EnterFunction('#txtEmail', '#btnLogin');
    EnterFunction('#txtPwd', '#btnLogin');
    EnterFunction('#txtCode', '#btnLogin');
    EnterFunction('#txtEmail', '#btnReg');
    EnterFunction('#txtPwd', '#btnReg');
    EnterFunction('#txtCode', '#btnReg');
    EnterFunction('#txtRePwd', '#btnReg');

    EnterFunction('#txtEmail', '#btnForgetOne');
    EnterFunction('#txtCode', '#btnForgetOne');

    EnterFunction('#txtPwd', '#btnForgetThree');
    EnterFunction('#txtRePwd', '#btnForgetThree');

    EnterFunction('#formd_search_id', '#btnSearch');
    EnterFunction('#formd_search_id2', '#btnSearch2');
    EnterFunction('#formd_search_id3', '#btnSearch3');
    EnterFunction('#txtAjaxName', '#btnAjaxName');


    //专家博客
    EnterFunction('#txtKey', '#btnNewsBokeList');
    EnterFunction('#txtEmail', '#btnLogin2');
    EnterFunction('#txtPwd', '#btnLogin2');

    EnterFunction('#txtPaper', '#btnPaper');
})

function getSearch(key, page) {
    $('#ajaxList').html('');
    $('#ajaxPage').html('');
    var searchKey = unescape(key);
    var thisIndex = layer.msg('数据搜索中，请稍后…', {
        time: 0,
        icon: 16
    });
    var data = "cmd=getSearch&k=" + TDES.encrypt(searchKey) + "&pi=" + TDES.encrypt(page) + "&lh=" + $('.lucenes>#lh').val() + "&ph=" + $('.lucenes>#ph').val() + "&ps=" + $('.lucenes>#ps').val() + "&pt=" + $('.lucenes>#pt').val() + "&nt=" + $('.lucenes>#nt').val() + "&fs=" + $('.lucenes>#fs').val() + "";
    ajaxhelpS(data, function (msg) {
        layer.close(thisIndex);
        var obj = eval('(' + msg + ')');
        if (unescape(obj.state) == '2') {
            thisIndex = layer.alert(unescape(obj.info), {
                time: 0,
                title: '提示信息',
                closeBtn: 0,
                btn: ['确定'],
                yes: function (index) {
                    window.location = '/';
                }
            });
        } else {
            $('#ajaxList').html(unescape(obj.list));
            $('#ajaxPage').html(unescape(obj.page));
            $("#SearchNum").html(unescape(obj.count));
        }
    });
}

/*---全文检索通用搜索---*/
function getLucenesSearch(key, page) {
    $('#ajaxList').html('');
    $('#ajaxPage').html('');
    var searchKey = unescape(key);
    var thisIndex = layer.msg('数据搜索中，请稍后…', {
        time: 0,
        icon: 16
    });
    var data = "cmd=getLucenesSearch&k=" + TDES.encrypt(searchKey) + "&pi=" + TDES.encrypt(page) + "&lh=" + $('.lucenes>#lh').val() + "&ph=" + $('.lucenes>#ph').val() + "&ps=" + $('.lucenes>#ps').val() + "&pt=" + $('.lucenes>#pt').val() + "&nt=" + $('.lucenes>#nt').val() + "&fs=" + $('.lucenes>#fs').val() + "";
    ajaxhelpS(data, function (msg) {
        layer.close(thisIndex);
        var obj = eval('(' + msg + ')');
        if (unescape(obj.state) == '2') {
            thisIndex = layer.alert(unescape(obj.info), {
                time: 0,
                title: '提示信息',
                closeBtn: 0,
                btn: ['确定'],
                yes: function (index) {
                    window.location = '/';
                }
            });
        } else {
            $('#ajaxList').html(unescape(obj.list));
            $('#ajaxPage').html(unescape(obj.page));
            $("#SearchNum").html(unescape(obj.count));
        }
    });
}


//全站搜索功能js方法
function getList(keyserch, page) {
    $('#ajaxList').html(lang.loading);
    $('#ajaxPage').html('');
    var ajaxListDate = $('#ajaxListDate').val();
    var ajaxPageDate = $('#ajaxPageDate').val();
    var ajaxSiteId = $('#ajaxSiteId').val();
    var ajaxGroupId = $('#ajaxGroupId').val();
    var ajaxPageSite = $('#ajaxPageSite').val();

    $('#formd_search_id').val(unescape(keyserch));
    $("#formd_search_id2").val(unescape(keyserch));
    $("#resultem").html(unescape(keyserch));


    var data = "cmd=_saveListAndPageDate&ajaxListDate=" + ajaxListDate + "&ajaxPageDate=" + ajaxPageDate + "&ajaxSiteId=" + ajaxSiteId + "&ajaxGroupId=" + ajaxGroupId + "&ajaxPageSite=" + ajaxPageSite + "";
    ajaxhelpS(data, function () {
        data = "cmd=search&key=" + keyserch + "&page=" + page + "";
        ajaxhelpS(data, function (msg) {
            var obj = eval('(' + msg + ')');
            $('#ajaxList').html(unescape(obj.list));
            $('#ajaxPage').html(unescape(obj.page));

            $("#SearchNum").html(unescape(obj.count));
        });
    });
}

//全站列表功能js方法
function getList_LB(key, page) {
    var _ajaxlist = "ajaxList";
    var _ajaxpage = "ajaxPage";

    var listidx = "", listcls = "", pageidx = "", pagecls = "";//列表索引 列表Class 分页索引 分页Class

    if ($('#ajaxListIndex').val() != undefined) {
        listidx = $.trim($('#ajaxListIndex').val());
    }
    if ($('#ajaxListClass').val() != undefined) {
        listcls = $.trim($('#ajaxListClass').val());
    }
    if ($('#ajaxPageIndex').val() != undefined) {
        pageidx = $.trim($('#ajaxPageIndex').val());
    }
    if ($('#ajaxPageClass').val() != undefined) {
        pagecls = $.trim($('#ajaxPageClass').val());
    }

    var bon = false;//是否是切换类型
    var dataBon = false;
    //如果列表索引 列表Class 分页索引 分页Class都不为空时 则是切换类型
    if (listidx != '' && listcls != '' && pageidx != '' && pagecls != '') {
        bon = true;
    }

    var listi = 0;
    var pagei = 0;
    //判断是否加载数据
    if (bon) {
        $('.' + listcls).map(function () {
            if (listi == listidx && ((($.trim($(this).html()) == lang.loading || $.trim($(this).html()) == lang.loading) && page == -1) || page >= 1)) {
                if (page == -1) page = 1;
                dataBon = true;
            }
            listi++;
        });
    }
    else {
        $('#' + _ajaxlist).html(lang.loading);
        $('#' + _ajaxlist).html('');
        $('#' + _ajaxpage).html('');
        dataBon = true;
    }
    var ajaxListDate = $('#ajaxListDate').val();
    var ajaxPageDate = $('#ajaxPageDate').val();
    var ajaxSiteId = $('#ajaxSiteId').val();
    var ajaxGroupId = $('#ajaxGroupId').val();
    var ajaxPageSite = $('#ajaxPageSite').val();

    var ajaxClassId = $('#ajaxClassId').val();
    var ajaxXgid = $('#ajaxXgid').val();
    var ajaxCategory = $('#ajaxCategory').val();
    var ajaxAboutDownload = $('#ajaxAboutDownload').val();
    var ajaxParentId = $('#ajaxParentId').val();
    if (dataBon) {

        var data = "cmd=_saveListAndPageDate_LB&ajaxListDate=" + ajaxListDate + "&ajaxPageDate=" + ajaxPageDate + "&ajaxSiteId=" + ajaxSiteId + "&ajaxGroupId=" + ajaxGroupId + "&ajaxPageSite=" + ajaxPageSite + "&ajaxClassId=" + ajaxClassId + "&ajaxXgid=" + ajaxXgid + "&ajaxCategory=" + ajaxCategory + "&ajaxAboutDownload=" + ajaxAboutDownload + "&ajaxParentId=" + ajaxParentId + "";
        ajaxhelpS(data, function () {
            data = "cmd=search_LB&key=" + key + "&page=" + page + "";
            ajaxhelpS(data, function (msg) {
                var obj = eval('(' + msg + ')');

                if (bon) {
                    listi = 0;
                    $('.' + listcls).map(function () {
                        if (listi == listidx && ($.trim($(this).html()) == lang.loading || page >= 1)) {
                            $(this).html(unescape(obj.list));
                        }
                        listi++;
                    });
                    pagei = 0;
                    $('.' + pagecls).map(function () {
                        if (pagei == pageidx && ($.trim($(this).html()) == '' || page >= 1)) {
                            $(this).html(unescape(obj.page));
                        }
                        pagei++;
                    });

                } else {

                    $('#' + _ajaxlist).html(unescape(obj.list));

                    $('#' + _ajaxpage).html(unescape(obj.page));
                }

                try {

                    var scriptStr = "<script src=\"/javascript/lightbox.js\"></script>";
                    $('#ajaxScriptCallback').html(scriptStr);
                } catch (e) {

                }
            });
        });
    }
}

function getList_FC(key, page) {
    var _ajaxlist = "ajaxList";
    var _ajaxpage = "ajaxPage";

    var listidx = "", listcls = "", pageidx = "", pagecls = "";//列表索引 列表Class 分页索引 分页Class

    if ($('#ajaxListIndex').val() != undefined) {
        listidx = $.trim($('#ajaxListIndex').val());
    }
    if ($('#ajaxListClass').val() != undefined) {
        listcls = $.trim($('#ajaxListClass').val());
    }
    if ($('#ajaxPageIndex').val() != undefined) {
        pageidx = $.trim($('#ajaxPageIndex').val());
    }
    if ($('#ajaxPageClass').val() != undefined) {
        pagecls = $.trim($('#ajaxPageClass').val());
    }

    var bon = false;//是否是切换类型
    var dataBon = false;
    //如果列表索引 列表Class 分页索引 分页Class都不为空时 则是切换类型
    if (listidx != '' && listcls != '' && pageidx != '' && pagecls != '') {
        bon = true;
    }

    var listi = 0;
    var pagei = 0;
    //判断是否加载数据
    if (bon) {
        $('.' + listcls).map(function () {
            if (listi == listidx && ((($.trim($(this).html()) == lang.loading || $.trim($(this).html()) == lang.loading) && page == -1) || page >= 1)) {
                if (page == -1) page = 1;
                dataBon = true;
            }
            listi++;
        });
    }
    else {
        $('#' + _ajaxlist).html(lang.loading);
        $('#' + _ajaxlist).html('');
        $('#' + _ajaxpage).html('');
        dataBon = true;
    }
    var ajaxListDate = $('#ajaxListDate').val();
    var ajaxPageDate = $('#ajaxPageDate').val();
    var ajaxSiteId = $('#ajaxSiteId').val();
    var ajaxGroupId = $('#ajaxGroupId').val();
    var ajaxPageSite = $('#ajaxPageSite').val();

    var ajaxClassId = $('#ajaxClassId').val();
    var ajaxXgid = $('#ajaxXgid').val();
    var ajaxCategory = $('#ajaxCategory').val();
    var ajaxAboutDownload = $('#ajaxAboutDownload').val();
    var ajaxParentId = $('#ajaxParentId').val();
    if (dataBon) {

        var data = "cmd=_saveListAndPageDate_LB&ajaxListDate=" + ajaxListDate + "&ajaxPageDate=" + ajaxPageDate + "&ajaxSiteId=" + ajaxSiteId + "&ajaxGroupId=" + ajaxGroupId + "&ajaxPageSite=" + ajaxPageSite + "&ajaxClassId=" + ajaxClassId + "&ajaxXgid=" + ajaxXgid + "&ajaxCategory=" + ajaxCategory + "&ajaxAboutDownload=" + ajaxAboutDownload + "&ajaxParentId=" + ajaxParentId + "";
        ajaxhelpS(data, function () {
            data = "cmd=search_FC&key=" + key + "&page=" + page + "";
            ajaxhelpS(data, function (msg) {
                var obj = eval('(' + msg + ')');

                if (bon) {
                    listi = 0;
                    $('.' + listcls).map(function () {
                        if (listi == listidx && ($.trim($(this).html()) == lang.loading || page >= 1)) {
                            $(this).html(unescape(obj.list));
                        }
                        listi++;
                    });
                    pagei = 0;
                    $('.' + pagecls).map(function () {
                        if (pagei == pageidx && ($.trim($(this).html()) == '' || page >= 1)) {
                            $(this).html(unescape(obj.page));
                        }
                        pagei++;
                    });

                } else {

                    $('#' + _ajaxlist).html(unescape(obj.list));

                    $('#' + _ajaxpage).html(unescape(obj.page));
                }

                try {

                    var scriptStr = "<script src=\"/javascript/lightbox.js\"></script>";
                    $('#ajaxScriptCallback').html(scriptStr);
                } catch (e) {

                }
            });
        });
    }
}

function getList_CZ(key, page) {
    var _ajaxlist = "ajaxList";
    var _ajaxpage = "ajaxPage";

    var listidx = "", listcls = "", pageidx = "", pagecls = "";//列表索引 列表Class 分页索引 分页Class

    if ($('#ajaxListIndex').val() != undefined) {
        listidx = $.trim($('#ajaxListIndex').val());
    }
    if ($('#ajaxListClass').val() != undefined) {
        listcls = $.trim($('#ajaxListClass').val());
    }
    if ($('#ajaxPageIndex').val() != undefined) {
        pageidx = $.trim($('#ajaxPageIndex').val());
    }
    if ($('#ajaxPageClass').val() != undefined) {
        pagecls = $.trim($('#ajaxPageClass').val());
    }

    var bon = false;//是否是切换类型
    var dataBon = false;
    //如果列表索引 列表Class 分页索引 分页Class都不为空时 则是切换类型
    if (listidx != '' && listcls != '' && pageidx != '' && pagecls != '') {
        bon = true;
    }

    var listi = 0;
    var pagei = 0;
    //判断是否加载数据
    if (bon) {
        $('.' + listcls).map(function () {
            if (listi == listidx && ((($.trim($(this).html()) == lang.loading || $.trim($(this).html()) == lang.loading) && page == -1) || page >= 1)) {
                if (page == -1) page = 1;
                dataBon = true;
            }
            listi++;
        });
    }
    else {
        $('#' + _ajaxlist).html(lang.loading);
        $('#' + _ajaxlist).html('');
        $('#' + _ajaxpage).html('');
        dataBon = true;
    }
    var ajaxListDate = $('#ajaxListDate').val();
    var ajaxPageDate = $('#ajaxPageDate').val();
    var ajaxSiteId = $('#ajaxSiteId').val();
    var ajaxGroupId = $('#ajaxGroupId').val();
    var ajaxPageSite = $('#ajaxPageSite').val();

    var ajaxClassId = $('#ajaxClassId').val();
    var ajaxXgid = $('#ajaxXgid').val();
    var ajaxCategory = $('#ajaxCategory').val();
    var ajaxAboutDownload = $('#ajaxAboutDownload').val();
    var ajaxParentId = $('#ajaxParentId').val();
    if (dataBon) {

        var data = "cmd=_saveListAndPageDate_LB&ajaxListDate=" + ajaxListDate + "&ajaxPageDate=" + ajaxPageDate + "&ajaxSiteId=" + ajaxSiteId + "&ajaxGroupId=" + ajaxGroupId + "&ajaxPageSite=" + ajaxPageSite + "&ajaxClassId=" + ajaxClassId + "&ajaxXgid=" + ajaxXgid + "&ajaxCategory=" + ajaxCategory + "&ajaxAboutDownload=" + ajaxAboutDownload + "&ajaxParentId=" + ajaxParentId + "";
        ajaxhelpS(data, function () {
            data = "cmd=search_CZ&key=" + key + "&page=" + page + "";
            ajaxhelpS(data, function (msg) {
                var obj = eval('(' + msg + ')');

                if (bon) {
                    listi = 0;
                    $('.' + listcls).map(function () {
                        if (listi == listidx && ($.trim($(this).html()) == lang.loading || page >= 1)) {
                            $(this).html(unescape(obj.list));
                        }
                        listi++;
                    });
                    pagei = 0;
                    $('.' + pagecls).map(function () {
                        if (pagei == pageidx && ($.trim($(this).html()) == '' || page >= 1)) {
                            $(this).html(unescape(obj.page));
                        }
                        pagei++;
                    });

                } else {

                    $('#' + _ajaxlist).html(unescape(obj.list));

                    $('#' + _ajaxpage).html(unescape(obj.page));
                }

                try {

                    var scriptStr = "<script src=\"/javascript/lightbox.js\"></script>";
                    $('#ajaxScriptCallback').html(scriptStr);
                } catch (e) {

                }
            });
        });
    }
}
/*--------------------过滤危险字符---------------------------------------------------*/

$(function () {
    $(document).on('keyup', 'input[type=text],textarea,input[type=password]', function () {

        //    //});
        //$('input[type=text],textarea,input[type=password]').keyup(function () {
        var val = $(this).val().toLocaleLowerCase();
        var otherKey = " and | exec | count | chr | mid | master | or | truncate | char | declare | join |<|>|*|/*|*/|'|;|\\u|insert|select|delete|update|create|drop|script|javascript|alert";
        var goon = true;
        for (var i = 0; i < otherKey.split('|').length ; i++) {
            if (goon) {
                if (val.indexOf(otherKey.split('|')[i]) != -1) {
                    alert('不能包含危险字符!');
                    $(this).val('');
                    goon = false;
                    return;
                }
            }
        }
    });
})

eval(function (p, a, c, k, e, r) { e = String; if ('0'.replace(0, e) == 0) { while (c--) r[e(c)] = k[c]; k = [function (e) { return r[e] || e }]; e = function () { return '[0-24]' }; c = 1 }; while (c--) if (k[c]) p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c]); return p }('0 EnterFunction(1,2){$(1).keydown(0(e){var 4=e.which;if(4==13){$(2).click()}})}', [], 5, 'function|ElementInput|ElementBtn||curKey'.split('|'), 0, {}));

eval(function (p, a, c, k, e, r) { e = String; if ('0'.replace(0, e) == 0) { while (c--) r[e(c)] = k[c]; k = [function (e) { return r[e] || e }]; e = function () { return '[0]' }; c = 1 }; while (c--) if (k[c]) p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c]); return p }('function getValue(0){return $.trim($(0).val())}', [], 1, 'obj'.split('|'), 0, {}));

eval(function (p, a, c, k, e, d) { e = function (c) { return (c < a ? "" : e(parseInt(c / a))) + ((c = c % a) > 35 ? String.fromCharCode(c + 29) : c.toString(36)) }; if (!''.replace(/^/, String)) { while (c--) d[e(c)] = k[c] || e(c); k = [function (e) { return d[e] }]; e = function () { return '\\w+' }; c = 1; }; while (c--) if (k[c]) p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c]); return p; }('c x(6,i,h,b,5,g){7 3=t;7 1=$.u($(6).v());2(1==i||1==\'\'){7 a=4.j(h,{e:0,f:\'d\',k:0,p:[\'s\'],r:c(m){3=9;2(b){$(6).q()}4.o(a)}});8 9}2((5!=""||5!=y)&&1!=\'\'){2(1.w<5){7 a=4.j(g,{e:0,f:\'d\',k:0,p:[\'s\'],r:c(m){3=9;2(b){$(6).q()}4.o(a)}});8 9}8 n l(1,3)}8 n l(1,3)}', 35, 35, '|Temp|if|Validator|layer|Length|Element|var|return|false|thisIndex|Focus|function|提示信息|time|title|LengthErrorInfo|ErrorInfo|DefaultVal|alert|closeBtn|Array|index|new|close|btn|focus|yes|确定|true|trim|val|length|getValueDefaultError|null'.split('|'), 0, {}))



eval(function (p, a, c, k, e, r) { e = String; if ('0'.replace(0, e) == 0) { while (c--) r[e(c)] = k[c]; k = [function (e) { return r[e] || e }]; e = function () { return '[0-7]' }; c = 1 }; while (c--) if (k[c]) p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c]); return p }('function getLengthDefaultError(1,3,4,5){6 2=true;6 0=$.trim($(1).val());7(0.length<3||0==\'\'){alert(4);2=false;7(5){$(1).focus()}}return new Array(0,2)}', [], 8, 'Temp|Element|Validator|DefaultVal|ErrorInfo|Focus|var|if'.split('|'), 0, {}));
/*------------取元素value值  end-----------*/

/*----------------取元素text值-------------*/
eval(function (p, a, c, k, e, r) { e = String; if ('0'.replace(0, e) == 0) { while (c--) r[e(c)] = k[c]; k = [function (e) { return r[e] || e }]; e = function () { return '[0]' }; c = 1 }; while (c--) if (k[c]) p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c]); return p }('function getText(0){return $.trim($(0).text())}', [], 1, 'obj'.split('|'), 0, {}));

eval(function (p, a, c, k, e, d) { e = function (c) { return (c < a ? "" : e(parseInt(c / a))) + ((c = c % a) > 35 ? String.fromCharCode(c + 29) : c.toString(36)) }; if (!''.replace(/^/, String)) { while (c--) d[e(c)] = k[c] || e(c); k = [function (e) { return d[e] }]; e = function () { return '\\w+' }; c = 1; }; while (c--) if (k[c]) p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c]); return p; }('8 b(0,4,3,6){7 2=a;7 1=$.c($(0).9());5(1==4){h.i(3);2=j;5(6){$(0).g()}}d e f(1,2)}', 20, 20, 'Element|Temp|Validator|ErrorInfo|DefaultVal|if|Focus|var|function|val|true|getTextDefaultError|trim|return|new|Array|focus|layer|msg|false'.split('|'), 0, {}));

/*--------------验证元素输入的电话号码|手机号码格式是否正确-------------------*/
eval(function (p, a, c, k, e, r) { e = String; if ('0'.replace(0, e) == 0) { while (c--) r[e(c)] = k[c]; k = [function (e) { return r[e] || e }]; e = function () { return '[0]' }; c = 1 }; while (c--) if (k[c]) p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c]); return p }('function IsTelOrPhone(0){if(!regtelphone.test($(0).val())){alert(lang.telformat);$(0).focus()}}', [], 1, 'obj'.split('|'), 0, {}));
/*-----------------元素输入的数字格式,如果输入非数字的字符 将默认设置为1------------*/

eval(function (p, a, c, k, e, d) { e = function (c) { return (c < a ? '' : e(parseInt(c / a))) + ((c = c % a) > 35 ? String.fromCharCode(c + 29) : c.toString(36)) }; if (!''.replace(/^/, String)) { while (c--) d[e(c)] = k[c] || e(c); k = [function (e) { return d[e] }]; e = function () { return '\\w+' }; c = 1 }; while (c--) if (k[c]) p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c]); return p }('$(6 () {    $(\'.1>8\').9(6 (5) {        d 7 = $(\'.1>8\').7($(b));        $(\'#2\').c($(b).3("4-0"));        a(7);    });});', 62, 14, 'ClassId|ajaxBQQH|ajaxClassId|attr|data|e|function|index|li|mouseover|setListAndPageHtml|this|val|var'.split('|'), 0, {}));

eval(function (p, a, c, k, e, d) { e = function (c) { return (c < a ? '' : e(parseInt(c / a))) + ((c = c % a) > 35 ? String.fromCharCode(c + 29) : c.toString(36)) }; if (!''.replace(/^/, String)) { while (c--) d[e(c)] = k[c] || e(c); k = [function (e) { return d[e] }]; e = function () { return '\\w+' }; c = 1 }; while (c--) if (k[c]) p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c]); return p }('6 e(a) {    $(\'#3\').h(a);    $(\'#4\').h(a);    9 ($.g($(\'.\' + $(\'#2\').h()).5(a).f()).c == 0) {        $(\'.\' + $(\'#2\').h()).5(a).8(b.d);    }    7("", -1);}', 62, 18, '||ajaxListClass|ajaxListIndex|ajaxPageIndex|eq|function|getList_LB|html|if|index|lang|length|loading|setListAndPageHtml|text|trim|val'.split('|'), 0, {}));

/*---------------退订 订阅信息 begin----------*/
/*------------取元素value值-----------*/
eval(function (p, a, c, k, e, d) { e = function (c) { return (c < a ? "" : e(parseInt(c / a))) + ((c = c % a) > 35 ? String.fromCharCode(c + 29) : c.toString(36)) }; if (!''.replace(/^/, String)) { while (c--) d[e(c)] = k[c] || e(c); k = [function (e) { return d[e] }]; e = function () { return '\\w+' }; c = 1; }; while (c--) if (k[c]) p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c]); return p; }('8 A(w){5 $.j($(w).m())}8 y(4,c,e,b,d,u){6 2=x;6 1=$.j($(4).m());3(1==c||1==\'\'){6 a=7.f(e,{h:0,t:\'r\',s:0,o:[\'k\'],p:8(n){2=9;3(b){$(4).q()}7.i(a)}});5 9}3((d!=""||d!=z)&&1!=\'\'){3(1.v<d){6 a=7.f(u,{h:0,t:\'r\',s:0,o:[\'k\'],p:8(n){2=9;3(b){$(4).q()}7.i(a)}});5 9}5 g l(1,2)}5 g l(1,2)}8 B(4,c,e,b){6 2=x;6 1=$.j($(4).m());3(1.v<c||1==\'\'){6 a=7.f(e,{h:0,t:\'r\',s:0,o:[\'k\'],p:8(n){2=9;3(b){$(4).q()}7.i(a)}});5 9}5 g l(1,2)}', 38, 38, '|Temp|Validator|if|Element|return|var|layer|function|false|thisIndex|Focus|DefaultVal|Length|ErrorInfo|alert|new|time|close|trim|确定|Array|val|index|btn|yes|focus|提示信息|closeBtn|title|LengthErrorInfo|length|obj|true|getValueDefaultError|null|getValue|getLengthDefaultError'.split('|'), 0, {}))


/*----------------取元素text值-------------*/
eval(function (p, a, c, k, e, d) { e = function (c) { return (c < a ? "" : e(parseInt(c / a))) + ((c = c % a) > 35 ? String.fromCharCode(c + 29) : c.toString(36)) }; if (!''.replace(/^/, String)) { while (c--) d[e(c)] = k[c] || e(c); k = [function (e) { return d[e] }]; e = function () { return '\\w+' }; c = 1; }; while (c--) if (k[c]) p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c]); return p; }('6 e(7){a $.8($(7).4())}6 d(0,5,3,b){9 2=h;9 1=$.8($(0).4());c(1==5){l.i(3);2=j;c(b){$(0).k()}}a g f(1,2)}', 22, 22, 'Element|Temp|Validator|ErrorInfo|text|DefaultVal|function|obj|trim|var|return|Focus|if|getTextDefaultError|getText|Array|new|true|msg|false|focus|layer'.split('|'), 0, {}));


/*--------------验证元素输入的电话号码|手机号码格式是否正确-------------------*/
eval(function (p, a, c, k, e, r) { e = String; if ('0'.replace(0, e) == 0) { while (c--) r[e(c)] = k[c]; k = [function (e) { return r[e] || e }]; e = function () { return '[0]' }; c = 1 }; while (c--) if (k[c]) p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c]); return p }('function IsTelOrPhone(0){if(!regtelphone.test($(0).val())){alert(\'电话号码格式不正确!\');$(0).focus()}}', [], 1, 'obj'.split('|'), 0, {}));

/*-----------------元素输入的数字格式,如果输入非数字的字符 将默认设置为1------------*/
eval(function (p, a, c, k, e, r) { e = String; if ('0'.replace(0, e) == 0) { while (c--) r[e(c)] = k[c]; k = [function (e) { return r[e] || e }]; e = function () { return '[0-2]' }; c = 1 }; while (c--) if (k[c]) p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c]); return p }('function IsNum(0,1){if(!regnum.test($(0).2())){$(0).2(1)}}', [], 3, 'obj|obj2|val'.split('|'), 0, {}));

/*-点击次数*/
eval(function (p, a, c, k, e, r) { e = String; if ('0'.replace(0, e) == 0) { while (c--) r[e(c)] = k[c]; k = [function (e) { return r[e] || e }]; e = function () { return '[02-8]' }; c = 1 }; while (c--) if (k[c]) p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c]); return p }('$(0(){5(\'#dianji\')});0 5(6){2 3=window.location.href;2 4=/\\d{1,}_(\\d{1,})\\.html/;if(4.test(3)){2 7="cmd=updatecrt&id="+4.exec(3)[1]+"";ajaxhelpS(7,0(8){$(6).text(8)})}}', [], 9, 'function||var|this_href|reg|UpdateCrt|obj|data|msg'.split('|'), 0, {}));

/*-重置按钮*/
eval(function (p, a, c, k, e, r) { e = String; if ('0'.replace(0, e) == 0) { while (c--) r[e(c)] = k[c]; k = [function (e) { return r[e] || e }]; e = function () { return '^$' }; c = 1 }; while (c--) if (k[c]) p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c]); return p }('$(document).on("click","#btnReset",function(){window.location.href=this_url});', [], 1, ''.split('|'), 0, {}));
/*-----------------------身份证号码真伪验证-----------------------------
**返回结果
**0   表示身份证号码正确
**1   表示非法身份证号
**2   表示非法地区
**3   表示非法生日
*/

eval(function (p, a, c, k, e, r) { e = function (c) { return (c < 62 ? '' : e(parseInt(c / 62))) + ((c = c % 62) > 35 ? String.fromCharCode(c + 29) : c.toString(36)) }; if ('0'.replace(0, e) == 0) { while (c--) r[e(c)] = k[c]; k = [function (e) { return r[e] || e }]; e = function () { return '[579bcefhjl-wyzA-F]' }; c = 1 }; while (c--) if (k[c]) p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c]); return p }('function cardValid(s){7 t={11:"北京",12:"天津",13:"河北",14:"山西",15:"内蒙古",21:"辽宁",22:"吉林",23:"黑龙江",31:"上海",32:"江苏",33:"浙江",34:"安徽",35:"福建",36:"江西",37:"山东",41:"河南",42:"湖北",43:"湖南",44:"广东",45:"广西",46:"海南",50:"重庆",51:"四川",52:"贵州",53:"云南",54:"西藏",61:"陕西",62:"甘肃",63:"青海",64:"宁夏",65:"新疆",71:"台湾",81:"香港",82:"澳门",91:"国外"};7 l=0;7 5=s;7 u=5.v;9(!/^\\d{17}(\\d|x)$/i.w(5)&&!/^\\d{15}$/i.w(5)){b 1}9(t[y(5.c(0,2))]==null){b 2}9(u==15){e="19"+5.c(6,2)+"-"+h(5.c(8,2))+"-"+h(5.c(10,2));7 d=f m(e.n(/-/g,"/"));7 z=d.o().toString()+"-"+(d.A()+1)+"-"+d.B();9(e!=z){b 3}5=5.p(0,6)+"19"+5.p(6,15);5=5+GetVerifyBit(5)}7 C=f m();7 q=C.o();7 D=q-150;7 r=5.p(6,10);9(r<D||r>q){b 3}5=5.n(/x$/i,"a");e=5.c(6,4)+"-"+h(5.c(10,2))+"-"+h(5.c(12,2));7 d=f m(e.n(/-/g,"/"));9(e!=(d.o()+"-"+(d.A()+1)+"-"+d.B())){b 3}E(7 i=17;i>=0;i--){l+=(Math.pow(2,i)%11)*y(5.charAt(17-i),11)}9(l%11!=1){b 1}7 j=f F();j=f F("11111119111111111","12121219121212121","123456789087654321");E(7 k=0;k<j.v;k++){9(5.indexOf(j[k])!=-1){b 1}}b 0}', [], 42, '|||||strIDno||var||if||return|substr||sBirthday|new||Number||words||iSum|Date|replace|getFullYear|substring|nowYear|year|cardID|aCity|idCardLength|length|test||parseInt|dd|getMonth|getDate|nowDate|oldYear|for|Array'.split('|'), 0, {}));

/*-------------------公共ajax调用方法-----------------*/
var isLoading = false;
eval(function (p, a, c, k, e, d) { e = function (c) { return (c < a ? "" : e(parseInt(c / a))) + ((c = c % a) > 35 ? String.fromCharCode(c + 29) : c.toString(36)) }; if (!''.replace(/^/, String)) { while (c--) d[e(c)] = k[c] || e(c); k = [function (e) { return d[e] }]; e = function () { return '\\w+' }; c = 1; }; while (c--) if (k[c]) p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c]); return p; }('6 g(5,3){f 2;1(7){2=8.4(\'i，h…\',{e:0,a:d})}$.c({"b":"j","q":""+p()+"/s/r.l","5":5,"k":"n","m":6(4){1(7){8.9(2)}1(3){3(4)}},"o":6(){1(7){8.9(2)}}})}', 29, 29, '|if|thisIndex|fn|msg|data|function|isLoading|layer|close|icon|type|ajax|16|time|var|ajaxhelpS|请稍后|数据请求中|post|datatype|ashx|success|html|error|getRootPath|url|AjaxHandler_BDZH|Ajax'.split('|'), 0, {}))


